Stereoscopic-view techniques are spreading and being applied to movies, games, and the like. In movies, games, or the like, when a 3-dimensional (3D) virtual space is to be stereoscopically displayed, normally, the 3D virtual space is subjected to perspective projection based on a plurality of viewpoints (virtual cameras), whereby an image for right eye and an image for left eye for stereoscopic viewing are generated.
However, in conventional techniques, for example, in the case where a virtual object (e.g., a 2-dimensional image representing an operation button) having a graphical user interface (GUI) function is to be stereoscopically displayed in a 3D virtual space, various problems arise with respect to stereoscopic display of such objects. For example, the following problems arise.
It will be assumed that a GUI object is placed in a 3D virtual space (world coordinate system) and then subjected to perspective projection processing based on a plurality of viewpoints, whereby an image for stereoscopic viewing is generated. In this case, a GUI object positioned far from a viewpoint (virtual camera) is displayed on the display surface of a display device in a smaller manner than the same object positioned near the viewpoint. Therefore, depending on the positional relationship between a viewpoint and a GUI object, the GUI object placed in the space can be eventually displayed at a very small size.
On the other hand, it is preferable that a GUI object is displayed in such a manner (size and position) that allows a user to perform a predetermined operation via the displayed GUI object. In the case where a GUI object is positioned far from a viewpoint as described above, in order to prevent the GUI object from being displayed at a small size on the display surface, it is preferable that the size of the GUI object itself is set to be large. However, in this method, the actual size of the GUI object is different from the size at which the GUI object is displayed on the display surface. Therefore, it is difficult to obtain a desired display of the GUI object.
In addition, even in the case where a GUI object is to be finally stereoscopically displayed to a user with a sense of depth, in creating an application program, the screen design (placement of a GUI image such as an icon on the display surface) may be configured by 2-dimensionally placing a 2-dimensional image on the display surface. However, if the GUI object is subjected to projection processing as described above, a phenomenon occurs in which the GUI object is displayed at a position displaced from the assumed position on the display surface (for example, at a position moved from the assumed position toward the center of the screen).
Because of such a phenomenon, when a GUI object is to be displayed at a designated position on the display surface, it is desired that the manufacturer places the GUI object taking into consideration the manner in which the GUI object is stereoscopically viewed and the position at which the GUI object is displayed on the display surface.
Thus, in the case where a predetermined object is stereoscopically displayed as described above, the position and the size of the object on the display surface vary in accordance with depth information. Therefore, it is difficult to determine the depth position of the object upon stereoscopic viewing while designating the position and the size of the object on the display surface.
Therefore, a feature of the exemplary embodiments provides an image processing apparatus, a computer-readable storage medium having stored therein an image processing program, an image processing method, and an image processing system that are novel and capable of solving such a situation as described above.
In order to achieve the above feature, the exemplary embodiments can be provided in the following aspects, as an example. The following specific description is in all aspects illustrative for the understanding of the extent of the technology disclosed herein, and is not intended to be limited thereto. That is, it should be understood that, from the specific description, a person skilled in the art can implement the technology in the equivalent range based on the description of the technology and on the common technological knowledge.
In one aspect, the exemplary technology disclosed herein provides a computer-readable storage medium having stored therein an image processing program which is executed by a computer of an image processing apparatus capable of outputting an image in a stereoscopically visible manner. The image processing program causes the computer to function as: a virtual stereo camera setting acquiring section, a position designating section, a calculation section, and an image generation section.
The virtual stereo camera setting acquiring section acquires setting information about a virtual stereo camera configured for imaging of a virtual space to provide a first image for right eye and a first image for left eye in a stereoscopically visible manner;
The position designating section designates the position of a first object in the virtual space, including a depth-directional position thereof, which defines the imaging direction of the virtual stereo camera.
The calculation section calculates a displacement for allowing an image of the first object to be stereoscopically viewed, by using the setting information about the virtual stereo camera, and the depth-directional position of the first object.
The image generation section translates from a predetermined position, the first object that is associated with the position designated by the position designating section, along a plane perpendicular to the depth direction, to generate a second image for right eye and a second image for left eye each of which includes an image of the first object translated on the basis on the displacement.
It is noted that a projection plane disclosed herein is a conceptual plane assumed in projection processing, and is an exemplary expression for indicating a condition defining the projection processing. Therefore, the projection plane is not an absolute expression for defining intended projection processing or relevant processing, but may be replaced by another expression for defining another calculation method mathematically equivalent to a calculation for the projection processing, or for defining processing considered to be equivalent to or approximately the same as the projection processing in an information-processing sense. Therefore, it should be understood that the projection surface includes such equivalent things.
In addition, as used here, a “reference plane” refers to a plane for defining the setting about the distance from a virtual camera that causes an object to be appear present on the display surface when stereoscopically viewed.
In one embodiment, the image generation section may acquire the image of the first object by parallel projection, and may translate the acquired image, from a base point which is a position of the image on a projection plane of the parallel projection, along the projection plane.
In one embodiment, the first image for right eye and the first image for left eye may be obtained by performing perspective projection of the virtual space based on the position of a right virtual camera and the position of a left virtual camera composing the virtual stereo camera, respectively.
In various embodiments, the image generation section may project the first object on a projection plane by parallel projection based on a reference virtual camera functioning as a reference for the right virtual camera and the left virtual camera composing the virtual stereo camera; translate the projected image of the first object in a first direction, from a base point which is a position of the projected image on the projection plane, by a distance corresponding to the positional relationship between the right virtual camera and the reference virtual camera, the distance being a part of the displacement, thereby generating the second image for right eye; and translate the projected image of the first object in a second direction, from the base point, by a distance corresponding to the positional relationship between the left virtual camera and the reference virtual camera, the distance being a part of the displacement, thereby generating the second image for left eye.
In one embodiment, the image generation section may project the first object on a projection plane by parallel projection based on the reference virtual camera positioned at the middle point of the virtual stereo camera; translate the projected image of the first object in the first direction, from the base point, by the half of the displacement, thereby generating the second image for right eye; and translate the projected image of the first object in the direction opposite to the first direction, from the base point, by the half of the displacement, thereby generating the second image for left eye.
In another embodiment, the setting information about the virtual stereo camera may include the distance between the right virtual camera and the left virtual camera composing the virtual stereo camera, and the distance between the virtual stereo camera and a reference plane, perpendicular to the depth direction, for providing a stereoscopic view. The calculation section may calculate the displacement by using the distance between the right virtual camera and the left virtual camera.
In one embodiment, the image processing program may further cause the computer to function as a virtual camera interval changing section configured to change the distance between the right virtual camera and the left virtual camera. The virtual camera setting acquiring section may acquire the setting information about the virtual stereo camera that includes the distance changed by the virtual camera interval changing section.
In one embodiment, the virtual camera interval changing section may change the distance by acquiring an input signal corresponding to an operation of the image processing apparatus performed by a user.
In the above embodiments, the operation by a user may be performed via an input device having a slidable member. The movement amount of the slidable member may be associated with the distance between the right virtual camera and the left virtual camera.
In the above embodiments, a graphics processing unit included in the computer may function as the calculation section.
In the above embodiments, the first object may be defined as a 2-dimensional image that is parallel to a reference plane.
In various embodiments, the image generation section may superimpose an image obtained by translating the image of the first object, on each of the first image for right eye and the first image for left eye, thereby generating the second image for right eye and the second image for left eye.
In various embodiments, the exemplary technology disclosed herein may be provided as a program represented as a code aggregation for providing the function of the image processing program described above.
As used herein, a “code aggregate” refers to an aggregation of command representations or data representations suitable for processing by a calculator (computer). In addition, a “code aggregation for providing a function” refers to as a code aggregation for providing some function to another program. The code aggregate may be provided in an execution form, a source code form, an object code form, or another dedicated form.
In another embodiment, the exemplary technique disclosed herein may be applied as an apparatus, a system, or a method having the function of the image processing program implemented thereon.
As used herein, an “object” or a “virtual object” refers to a subject to be operated or processed in the information processing apparatus, and in some cases, refers to even its behavior. Therefore, a virtual object includes not only a 3-dimensional model defined by an individual coordinate system but also a 2-dimensional image (with which depth information is provided as necessary).
In addition, as used herein, a “computer-readable storage medium” refers to any apparatus or medium capable of storing a program, a code, and/or data to be used in a computer system. The computer-readable storage medium may be any one of a volatile device and a nonvolatile device as long as it can be read by a computer system. Examples of computer-readable storage media include a magnetic tape, a hard disc drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a Blu-ray (registered trademark) disc (BD), a semiconductor memory, but the exemplary embodiments are not limited thereto.
In addition, as used herein, a “system” (for example, a game system, an image processing system, or an information processing system) may include one apparatus, or may include a plurality of apparatuses each of which can communicate with another one of the apparatuses.
As used herein, a state where an apparatus or system is “connected” to another apparatus or system is not limited to a state of being connected by a line, and can include a state of being wirelessly connected.
Provided are an image processing program, an image processing apparatus, an image processing method, and an image processing system that provide novel stereoscopic display with increased convenience.
These and other objects, features, aspects and advantages of the exemplary embodiments disclosed herein will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.